package spring.cloud.tasks.api.zookeeper;

import org.apache.curator.framework.api.transaction.CuratorTransactionResult;

import java.util.Collection;

public interface TransactionalZooKeeper {

    TransactionalZooKeeper replace(String node, Object value) throws Exception;

    TransactionalZooKeeper replaceIfChanged(String node, Object value) throws Exception;

    TransactionalZooKeeper create(String node, Object value) throws Exception;

    TransactionalZooKeeper delete(String node) throws Exception;

    Collection<CuratorTransactionResult> commit() throws Exception;
}
